Skip to content

POC file picker#3787

Draft
zatteo wants to merge 5 commits intomasterfrom
feat/poc-file-picker
Draft

POC file picker#3787
zatteo wants to merge 5 commits intomasterfrom
feat/poc-file-picker

Conversation

@zatteo
Copy link
Copy Markdown
Member

@zatteo zatteo commented Apr 7, 2026

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5971d6e7-3a7e-4022-bbe9-e033f31366d5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/poc-file-picker

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@zatteo zatteo force-pushed the feat/poc-file-picker branch from 8e1ac55 to 75c6bf4 Compare April 8, 2026 18:29
Copy link
Copy Markdown

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gates Failed
New code is healthy (1 new file with code health below 10.00)

Gates Passed
2 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
New code is healthy Violations Code Health Impact
FilePickerBodyItem.jsx 1 rule 9.69 Suppress

Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

Comment on lines +36 to +114
const FilePickerBodyItem = ({
item,
itemTypesAccepted,
multiple,
handleChoiceClick,
handleListItemClick,
itemsIdsSelected,
hasDivider
}) => {
const classes = useStyles()
const { f } = useI18n()
const hasChoice =
isValidFile(item, itemTypesAccepted) ||
isValidFolder(item, itemTypesAccepted)

const Input = multiple ? Checkbox : Radio

const listItemSecondaryContent = isFile(item)
? `${f(item.updated_at, 'dd LLL yyyy')} - ${filesize(item.size, {
base: 10
})}`
: null

return (
<>
<ListItem
disabled={!hasChoice && isFile(item)}
size="small"
button
data-testid="list-item"
>
<div
data-testid="listitem-onclick"
className={styles['filePickerBreadcrumb-wrapper']}
onClick={handleListItemClick(item)}
>
<ListItemIcon>
<Icon
icon={isDirectory(item) ? FileTypeFolder : FileTypeText}
width="32"
height="32"
/>
</ListItemIcon>
<ListItemText
primary={item.name}
secondary={listItemSecondaryContent}
/>
</div>
{isDirectory(item) && hasChoice && (
<Divider
orientation="vertical"
flexItem
className={classes.verticalDivider}
/>
)}
<div
data-testid="choice-onclick"
className="u-pv-half u-h-2 u-flex u-flex-items-center"
onClick={hasChoice ? handleChoiceClick(item) : undefined}
>
<Input
data-testid={multiple ? 'checkbox-btn' : 'radio-btn'}
onChange={() => {
// handled by onClick on the container
}}
checked={itemsIdsSelected.includes(item._id)}
value={item._id}
className={cx('u-p-0', {
'u-o-100': hasChoice,
'u-o-0': !hasChoice
})}
disabled={!hasChoice}
/>
</div>
</ListItem>
{hasDivider && <Divider component="li" />}
</>
)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ New issue: Complex Method
FilePickerBodyItem has a cyclomatic complexity of 11, threshold = 10

Suppress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant